import * as world from '../../../public/world.json';

export default () => {
    let countryList = world.default.features;
    let map1 = new Map();
    let map2 = new Map();
    for(let i = 0; i < countryList.length; i++) {
        map1.set(countryList[i].properties.name, countryList[i].properties["iso-a3"]);
        map1.set(countryList[i].properties["iso-a3"], countryList[i].properties.name);
        map2.set(countryList[i].properties.name, countryList[i].properties["iso-a2"]);
        map2.set(countryList[i].properties["iso-a2"], countryList[i].properties.name);
    }
    return [map1,map2];
}